<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Function Reference - SDWBA.jl</title>
  

  <link rel="shortcut icon" href="../img/favicon.ico">

  
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="../css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
  <link rel="stylesheet" href="../css/highlight.css">

  
  <script>
    // Current page data
    var mkdocs_page_name = "Function Reference";
  </script>
  
  <script src="../js/jquery-2.1.1.min.js"></script>
  <script src="../js/modernizr-2.8.3.min.js"></script>
  <script type="text/javascript" src="../js/highlight.pack.js"></script>
  <script src="../js/theme.js"></script> 

  
</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
      <div class="wy-side-nav-search">
        <a href=".." class="icon icon-home"> SDWBA.jl</a>
        <div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        <ul class="current">
          
            <li>
    <li class="toctree-l1 ">
        <a class="" href="..">Introduction</a>
        
    </li>
<li>
          
            <li>
    <li class="toctree-l1 current">
        <a class="current" href="./">Function Reference</a>
        
            <ul>
            
                <li class="toctree-l3"><a href="#sdwba">SDWBA</a></li>
                
                    <li><a class="toctree-l4" href="#exported">Exported</a></li>
                
                    <li><a class="toctree-l4" href="#internal">Internal</a></li>
                
            
            </ul>
        
    </li>
<li>
          
            <li>
    <li class="toctree-l1 ">
        <a class="" href="../Models/">Included scatterers</a>
        
    </li>
<li>
          
        </ul>
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="..">SDWBA.jl</a>
      </nav>

      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="..">Docs</a> &raquo;</li>
    
      
    
    <li>Function Reference</li>
    <li class="wy-breadcrumbs-aside">
      
        
          <a href="https://github.com/ElOceanografo/SDWBA.jl" class="icon icon-github"> Edit on GitHub</a>
        
      
    </li>
  </ul>
  <hr/>
</div>
          <div role="main">
            <div class="section">
              
                <h1 id="sdwba">SDWBA</h1>
<h2 id="exported">Exported</h2>
<hr />
<p><a id="method__freq_spectrum.1" class="lexicon_definition"></a></p>
<h4 id="freq_spectrumssdwbascatterert-freq1-freq2-sound_speed">freq_spectrum(s::SDWBA.Scatterer{T},  freq1,  freq2,  sound_speed) <a href="#method__freq_spectrum.1">¶</a></h4>
<p>Calculate backscatter over a range of frequencies.  The insonifying sound comes
from above (i.e., traveling in the -z direction).</p>
<h4 id="parameters">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer object</li>
<li><code>freq1</code>, <code>freq2</code> : Endpoints of the angle range to calculate.</li>
<li><code>sound_speed</code> : Sound speed in the surrounding medium</li>
<li><code>n</code> : Number of frequencies to calculate; defaults to 100</li>
</ul>
<p>Returns: A dictionary containing elements "freqs", "sigma_bs", and "TS",
    each a length-n vector.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L275">SDWBA/src/Scatterer.jl:275</a></p>
<hr />
<p><a id="method__freq_spectrum.2" class="lexicon_definition"></a></p>
<h4 id="freq_spectrumssdwbascatterert-freq1-freq2-sound_speed-n">freq_spectrum(s::SDWBA.Scatterer{T},  freq1,  freq2,  sound_speed,  n) <a href="#method__freq_spectrum.2">¶</a></h4>
<p>Calculate backscatter over a range of frequencies.  The insonifying sound comes
from above (i.e., traveling in the -z direction).</p>
<h4 id="parameters_1">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer object</li>
<li><code>freq1</code>, <code>freq2</code> : Endpoints of the angle range to calculate.</li>
<li><code>sound_speed</code> : Sound speed in the surrounding medium</li>
<li><code>n</code> : Number of frequencies to calculate; defaults to 100</li>
</ul>
<p>Returns: A dictionary containing elements "freqs", "sigma_bs", and "TS",
    each a length-n vector.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L275">SDWBA/src/Scatterer.jl:275</a></p>
<hr />
<p><a id="method__from_csv.1" class="lexicon_definition"></a></p>
<h4 id="from_csvfilename">from_csv(filename) <a href="#method__from_csv.1">¶</a></h4>
<p>Load a scatterer from a file on disk with comma-separated values.</p>
<h4 id="parameters_2">Parameters</h4>
<ul>
<li><code>filename</code> : String.  Path to the datafile.  This should be a standard .csv file 
with columns for the x, y, and z coordinates of the scatterer's centerline, as well
as the <code>a</code>, <code>h</code>, and <code>g</code> arguments to Scatterer().</li>
<li><code>columns</code> : Optional dictionary of column names. If the columns do not have the names </li>
<li><code>x</code>, <code>y</code>, <code>z</code>, <code>h</code>, and <code>g</code>, this must be provided.  The keys are the standard column
names and the values are the actual ones in the file.</li>
</ul>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L297">SDWBA/src/Scatterer.jl:297</a></p>
<hr />
<p><a id="method__from_csv.2" class="lexicon_definition"></a></p>
<h4 id="from_csvfilename-columns">from_csv(filename,  columns) <a href="#method__from_csv.2">¶</a></h4>
<p>Load a scatterer from a file on disk with comma-separated values.</p>
<h4 id="parameters_3">Parameters</h4>
<ul>
<li><code>filename</code> : String.  Path to the datafile.  This should be a standard .csv file 
with columns for the x, y, and z coordinates of the scatterer's centerline, as well
as the <code>a</code>, <code>h</code>, and <code>g</code> arguments to Scatterer().</li>
<li><code>columns</code> : Optional dictionary of column names. If the columns do not have the names </li>
<li><code>x</code>, <code>y</code>, <code>z</code>, <code>h</code>, and <code>g</code>, this must be provided.  The keys are the standard column
names and the values are the actual ones in the file.</li>
</ul>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L297">SDWBA/src/Scatterer.jl:297</a></p>
<hr />
<p><a id="method__length.1" class="lexicon_definition"></a></p>
<h4 id="lengthssdwbascatterert">length(s::SDWBA.Scatterer{T}) <a href="#method__length.1">¶</a></h4>
<p>Return the length of the scatterer (cartesian distance from one end to the other).</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L50">SDWBA/src/Scatterer.jl:50</a></p>
<hr />
<p><a id="method__rescale.1" class="lexicon_definition"></a></p>
<h4 id="rescalessdwbascatterert">rescale(s::SDWBA.Scatterer{T}) <a href="#method__rescale.1">¶</a></h4>
<p>Scale the scatterer's size (overall or along a particular dimension) by a 
constant factor.</p>
<h4 id="parameters_4">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer object.</li>
<li><code>scale</code> : Factor by which to grow/shrink the scatterer.</li>
<li><code>radius</code>, <code>x</code>, <code>y</code>, <code>z</code> : Optional factors, scaling the scatterer's radius
and along each dimension in space. All default to 1.0.</li>
</ul>
<h4 id="returns">Returns</h4>
<p>A rescaled scatterer.</p>
<h4 id="details">Details</h4>
<p>When making a scatterer larger, it is important to make sure it's body has enough
segments to accurately represent the shape at the frequencies of interest.
Specifically, the ratio L / (N λ), where L is the length of the animal, N is the
number of segments, and λ is the acoustic wavelength, should remain constant, which
may require interpolating new points between the existing ones. See Conti and 
Demer (2006) or Calise and Skaret (2011) for details.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L75">SDWBA/src/Scatterer.jl:75</a></p>
<hr />
<p><a id="method__resize.1" class="lexicon_definition"></a></p>
<h4 id="resizessdwbascatterert-len">resize(s::SDWBA.Scatterer{T},  len) <a href="#method__resize.1">¶</a></h4>
<p>Resize a scatterer.  This is a convenience wrapper around <code>rescale</code>, for the
common situation where you want to change a scatterer to a specific length.
The scatterer's relative proportions are preserved.</p>
<h4 id="parameters_5">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer </li>
<li><code>len</code> : Desired length to which the scatterer should be scaled.</li>
</ul>
<h4 id="returns_1">Returns</h4>
<p>A resized scatterer.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L98">SDWBA/src/Scatterer.jl:98</a></p>
<hr />
<p><a id="method__rotate.1" class="lexicon_definition"></a></p>
<h4 id="rotatessdwbascatterert">rotate(s::SDWBA.Scatterer{T}) <a href="#method__rotate.1">¶</a></h4>
<p>Rotate the scatterer in space, returning a rotated copy.</p>
<h4 id="parameters_6">Parameters</h4>
<ul>
<li><code>roll</code> : Angle to roll the scatterer, in degrees. Defaults to 0.</li>
<li><code>tilt</code> : Angle to tilt the scatterer, in degrees. Defaults to 0.</li>
<li><code>yaw</code> : Angle to yaw the scatterer, in degrees. Defaults to 0.</li>
</ul>
<h4 id="returns_2">Returns</h4>
<p>A Scatterer with the same shape and properties, but a new orientation.</p>
<p>The roll, tilt, and yaw refer to rotations around the x, y, and z axes,
respectively. They are applied in that order.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L144">SDWBA/src/Scatterer.jl:144</a></p>
<hr />
<p><a id="method__tilt_spectrum.1" class="lexicon_definition"></a></p>
<h4 id="tilt_spectrumssdwbascatterert-angle1-angle2-k">tilt_spectrum(s::SDWBA.Scatterer{T},  angle1,  angle2,  k) <a href="#method__tilt_spectrum.1">¶</a></h4>
<p>Calculate backscatter over a range of angles.</p>
<h4 id="parameters_7">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer object</li>
<li><code>angle1</code>, <code>angle2</code> : Endpoints of the angle range to calculate.</li>
<li><code>k</code> : Acoustic wavenumber vector</li>
<li><code>n</code> : Number of angles to calculate; defaults to 100</li>
</ul>
<h4 id="returns_3">Returns</h4>
<p>A dictionary containing elements "angles", "sigma_bs", and "TS",
each a length-n vector.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L250">SDWBA/src/Scatterer.jl:250</a></p>
<hr />
<p><a id="method__tilt_spectrum.2" class="lexicon_definition"></a></p>
<h4 id="tilt_spectrumssdwbascatterert-angle1-angle2-k-n">tilt_spectrum(s::SDWBA.Scatterer{T},  angle1,  angle2,  k,  n) <a href="#method__tilt_spectrum.2">¶</a></h4>
<p>Calculate backscatter over a range of angles.</p>
<h4 id="parameters_8">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer object</li>
<li><code>angle1</code>, <code>angle2</code> : Endpoints of the angle range to calculate.</li>
<li><code>k</code> : Acoustic wavenumber vector</li>
<li><code>n</code> : Number of angles to calculate; defaults to 100</li>
</ul>
<h4 id="returns_4">Returns</h4>
<p>A dictionary containing elements "angles", "sigma_bs", and "TS",
each a length-n vector.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L250">SDWBA/src/Scatterer.jl:250</a></p>
<hr />
<p><a id="method__to_csv.1" class="lexicon_definition"></a></p>
<h4 id="to_csvssdwbascatterert-filename">to_csv(s::SDWBA.Scatterer{T},  filename) <a href="#method__to_csv.1">¶</a></h4>
<p>Save a scatterer's shape to a file on disk with comma-separated values.</p>
<h4 id="parameters_9">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer object to save.</li>
<li><code>filename</code> : Where to save it.</li>
</ul>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L318">SDWBA/src/Scatterer.jl:318</a></p>
<h2 id="internal">Internal</h2>
<hr />
<p><a id="method__interpolate.1" class="lexicon_definition"></a></p>
<h4 id="interpolatessdwbascatterert-n">interpolate(s::SDWBA.Scatterer{T},  n) <a href="#method__interpolate.1">¶</a></h4>
<p>Resample a scatterer's measurement points by interpolating between them. Used
to change the resolution, for instance when increasing the scatterer's body 
size or decreasing the acoustic wavelength.</p>
<h4 id="parameters_10">Parameters</h4>
<ul>
<li><code>s</code> : Scatterer</li>
<li><code>n</code> : Number of body segments desired in the interpolated scatterer.</li>
</ul>
<h4 id="returns_5">Returns</h4>
<p>A Scatterer with a different number of body segments.</p>
<p><em>source:</em>
<a href="https://github.com/ElOceanografo/SDWBA.jl/tree/58159dc1cd2fa7416e74887232848ebaba820633/src/Scatterer.jl#L116">SDWBA/src/Scatterer.jl:116</a></p>
              
            </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="../Models/" class="btn btn-neutral float-right" title="Included scatterers"/>Next <span class="icon icon-circle-arrow-right"></span></a>
      
      
        <a href=".." class="btn btn-neutral" title="Introduction"><span class="icon icon-circle-arrow-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <!-- Copyright etc -->
    
  </div>

  Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
	  
        </div>
      </div>

    </section>

  </div>

<div class="rst-versions" role="note" style="cursor: pointer">
    <span class="rst-current-version" data-toggle="rst-current-version">
      
          <a class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
      
      
        <span><a href=".." style="color: #fcfcfc;">&laquo; Previous</a></span>
      
      
        <span style="margin-left: 15px"><a href="../Models/" style="color: #fcfcfc">Next &raquo;</a></span>
      
    </span>
</div>

</body>
</html>
